<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            box-sizing: border-box;
        }
        .box{
            display: flex;
            width: 500px;
            justify-content: space-between;
        }
        .box :first-child{
            flex: 0 150px;
            height: 200px;
            border: 1px solid #ccc;
        }
        .box :last-child{
            flex: 0 200px;
            height: 200px;
            border: 1px solid #ccc;
        }
        /* flex的第二个参数是指他在父元素盒子中占用的宽度 */
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
    </div>
</body>
</html>